<template>
	<view>
		<u-swiper :height="135" :list="imgList" :title="false" @click="imgListClick" style="padding: 10px;"></u-swiper>
		<view class="workbench-title">订单管理</view>
		<view class="toolbar">
			<u-grid class="grid" :col="4" :border="false">
				<u-grid-item :index="0" @click="navTo('/pages/supplyChain/sellOrder/index')">
					<view class="home-icon" style="color:#ef8e35 ">
						<i class="iconfont icon-zu171"></i>
					</view>
					<view class="grid-text">销售下单</view>
				</u-grid-item>
<!-- 				<u-grid-item :index="1" @click="navTo('/pages/sys/workbench/add-form')">
					<view class="home-icon icon-color04">
						<i class="iconfont icon-kehuguanli" style="color: red;"></i>
					</view>
					<view class="grid-text">客户管理</view>
				</u-grid-item> -->
			</u-grid>
		</view>
		<view class="workbench-title">客户管理</view>
		<view class="toolbar">
			<u-grid class="grid" :col="4" :border="false">
				<u-grid-item :index="0" @click="navTo('/pages/sys/workbench/add-form')">
					<view class="home-icon icon-color04">
						<i class="iconfont icon-kehuguanli" style="color: red;"></i>
					</view>
					<view class="grid-text">客户管理</view>
				</u-grid-item>

			</u-grid>
		</view>
		<u-divider text="我是有底线的哟!" :dashed="true"></u-divider>
		<u-tabbar :value="currentTabbar" @change="name => currentTabbar = name" :fixed="true" :placeholder="true"
			:safeAreaInsetBottom="true">
			<u-tabbar-item text="云工作台" icon="arrow-leftward" />
			<u-tabbar-item text="供应链工作台" icon="home" />
			<u-tabbar-item text="我的" icon="account"></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	import base from '@/apis/base.js'
	export default {
		data() {
			return {
				imgList: ['/static/supplyChain/banner.jpg', '/static/supplyChain/1500021428.jpg',
					'/static/supplyChain/1500022158.jpg', '/static/supplyChain/new-img-d.png'
				],
				currentTabbar: 0
			}
		},
		methods: {
			async getBanner() {
				let res = await base.login({
					id: 1
				})
				console.info(res)
				console.info("12121")
			},
			imgListClick(index) {
				console.log(`点击了第${index + 1}页图片`)
			},
			navTo(url) {
				uni.navigateTo({
					url: url
				});
			},
		},
		onLoad() {
			this.getBanner();
		}
	}
</script>

<style>
	.u-swiper {
		background-color: white !important;
	}

	.workbench-title {
		font-size: 32rpx;
		font-weight: bold;
		color: #333333;
		padding: 5px 30rpx;
		margin-bottom: 10px;
	}

	.home-icon {
		width: 48px;
		height: 48px;
		align-items: center;
		border-radius: 6px;
		box-sizing: border-box;
		display: flex;
		justify-content: center;
		color: #ff5500;
		font-size: 26px;
	}

	.grid-text {
		font-size: 24rpx;
		padding: 15rpx;
		color: #202328;
	}
	.toolbar{
		margin-bottom: 20px;
	}
</style>